import { Dispatch } from "react";
import {
  IGlobalState,
  IGlobalStateAction,
  useGlobalState,
} from "src/hooks/useGlobalState";
import { createContainer } from "unstated-next";

/** 全局状态数据类型 */
const GlobalState = createContainer<
  [IGlobalState, Dispatch<IGlobalStateAction>],
  Partial<IGlobalState>
>(useGlobalState);

export { GlobalState };